POV-Ray : Newsgroups : povray.text.tutorials : Q: Macro tutorial? : Re: Q: Macro tutorial? Server Time
28 Apr 2024 01:54:51 EDT (-0400)
  Re: Q: Macro tutorial?  
From: Ken
Date: 30 Jan 2000 15:09:42
Message: <38949A61.505CEAC4@pacbell.net>
Nieminen Juha wrote:
> 

> : Was wondering if there is a macro tutorial out there somewhere,
> : something else than the scene-language description of the povray
> : documentation.
> 
>   What do you mean by macro tutorial?

I personally do not know of any online tutorials on how to make a
POV-Ray macro and doubt anyone could really explain all of their
possibilities in depth.

  When macros were first introduced Chris Colefax took a little
time to explain them to me and failed miserably - my fault not his.
In my opinion the best way to learn how macros work is by example.
On my web page you can download a .zip file that has many macros
with examples of how they are used. I would suggest you download
the file, take a look at how the macros are structured, how they
are used, and then try to write a very basic macro based on what
you learned. As you become more proficient with them you can get
more and more complicated with them.

 Since most macros rely heavily on math operations your ability
to use them will vary with your math skills and your knowledge
of POV-Ray's built in functions. A basic knowledge of programming
wouldn't hurt either but it not entirely necessary -  I am a
living example of that and have made a couple of useful macros
since they were introduced. Just learning how to use someone
else's macros will help you understand how they work.

  The most important thing to learn about macros is that all they
really do is to pass parameters to functions used by POV-Ray and
make it easy for the person using the macro to quickly change
variables when needed. You can eliminate a lot of declared variables
commonly found in a .inc file by using a macro instead.


-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.